import React, {Component} from 'react';
import {Affix, Button} from "antd";
import {messages} from "share/common";
import GenerateBatch from "./generate-batch";
import ButtonPrintCertificate from "../../expense-report/components/button-print-certificate";

class ExpenseViewBar extends Component {
  render() {
    const { info, goBack } = this.props;
    return (
      <Affix offsetBottom={0} className="bottom-bar">
        <GenerateBatch
          mode='single'
          params={{entityOID: info.expenseReportOID, entityType: 1002}}
          isExpenseReportView
          btnProps={{
            name: messages('common.print')/*打印*/,
          }}
        />
        <ButtonPrintCertificate
          appCode="Exp_Report_Print_Doc"
          businessCode={info.businessCode}
          parentBusinessCode={info.parentBusinessCode}
        />
        <Button
          style={{ marginLeft: 10 }}
          onClick={goBack}
        >
          {messages("common.back")/*返回*/}
        </Button>
      </Affix>
    );
  }
}

export default ExpenseViewBar;
